/**
 *MazeFrame.java
 *@anthor Daniel Liu
 *2006-5-11 ����10:35:39
 **/
package ui;

import java.awt.BorderLayout;

import javax.swing.JFrame;
import javax.swing.JPanel;

import org.lex.awt.Move;


public class MazeFrame extends JFrame {
	private JPanel pane = null;
	private MazePane mazePane = null;

	public MazeFrame() {
		super();
		initialize();
	}

	private void initialize() {
		this.setSize(600, 625);
		this.setContentPane(getPane());
		this.setTitle("Maze");
		this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		Move.toScreenCenter(this);
	}

	private JPanel getPane() {
		if (pane == null) {
			pane = new JPanel();
			pane.setLayout(new BorderLayout());
			pane.add(getMazePane(), java.awt.BorderLayout.CENTER);
		}
		return pane;
	}

	private MazePane getMazePane() {
		if (mazePane == null) {
			mazePane = new MazePane();
		}
		return mazePane;
	}

	public static void main(String[] args) {
		new MazeFrame().setVisible(true);
	}
}
